# -*- coding:utf-8 -*-
from . import db


class MapData(db.Model):
    """
    MapData ORM实体类
    """
    __tablename__ = "map_data"

    id = db.Column(db.String(36), primary_key=True)
    name = db.Column(db.String(128), nullable=False)
    type = db.Column(db.String(64))
    keywords = db.Column(db.String(64))
    type_code = db.Column(db.String(36))
    province_code = db.Column(db.String(36))
    city_code = db.Column(db.String(36))
    are_code = db.Column(db.String(36))
    province_name = db.Column(db.String(64))
    city_name = db.Column(db.String(64))
    are_name = db.Column(db.String(64))
    street = db.Column(db.String(64))
    address = db.Column(db.String(128))
    location = db.Column(db.String(30))
    tel = db.Column(db.String(64))
    create_time = db.Column(db.DateTime, nullable=False)
    creator = db.Column(db.String(128))
    creator_id = db.Column(db.String(36))

    def __repr__(self):
        return "MapData: { id: %s , name: %s }" % (self.id, self.name)
